<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang='en'>
<head>
	<meta charset='utf-8' />
	<title>smeoa</title>
	<meta content='' name='description' />
	<meta content='' name='author' />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!-- Bootstrap -->
	<link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet" media="screen">
	<link href="__PUBLIC__/css/font-awesome.min.css" rel="stylesheet" >
	
	<!--[if IE 7]>
	<link  href="__PUBLIC__/css/font-awesome-ie7.min.css" rel="stylesheet">
	<![endif]-->

	<link href="__PUBLIC__/css/bootstrap-responsive.css" rel="stylesheet">
	<link href="__PUBLIC__/css/test.css" rel="stylesheet">
	<script src="__PUBLIC__/js/jquery.js"></script>
	<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
	<!--[if lt IE 9]>
	<script src="__PUBLIC__/js/html5shiv.js"></script>
	<script src="__PUBLIC__/js/respond.min.js"></script>
	<![endif]-->
</head>
<body>
	<div class="shade"></div>
	<div class="row-fluid navbar visible-phone">
	<div class="row-fluid">
		<a class="brand" href="<?php echo U('Home/index');?>">杰购电子</a>
		<a data-toggle="collapse" data-target="#top_menu" class="right"> <i class="brand icon-th-list"></i>
		</a>
	</div>
	<div class="collapse" id="top_menu">
		<ul class="nav nav-pills">
			<?php if(is_array($list_top_menu)): $i = 0; $__LIST__ = $list_top_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tag): $mod = ($i % 6 );++$i;?><li>
					<a  href="#" url="<?php echo U($tag['url']);?>" node="<?php echo ($key); ?>" onclick="click_top_menu(this)"><?php echo ($tag["name"]); ?></a>
				</li><?php endforeach; endif; else: echo "" ;endif; ?>
		</ul>
	</div>
</div>
<div class="row-fluid navbar hidden-phone">
	<a class="brand" href="<?php echo U('Home/index');?>">杰购电子</a>
	<ul class="nav nav-pills">
		<?php if(is_array($list_top_menu)): $i = 0; $__LIST__ = $list_top_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tag): $mod = ($i % 6 );++$i;?><li>
				<a  href="#" url="<?php echo U($tag['url']);?>" node="<?php echo ($key); ?>" onclick="click_top_menu(this)"><?php echo ($tag["name"]); ?></a>
			</li><?php endforeach; endif; else: echo "" ;endif; ?>
	</ul>
	<aside>
		<span>
			<a href="__APP__/config">设置</a>
		</span>
		<span>
			<a href="#"><?php echo (session('user_name')); ?></a>
		</span>
		<span>
			<a href="<?php echo U('login/logout');?>">退出</a>
		</span>
		&nbsp;&nbsp;
	</aside>
</div>
	
<div class="home">
	<div class="row-fluid">
		<!-- 邮件开始 -->
		<div class="tabbable span6 tab_box" sort="1">
			<div class="tab_head">
				<span>邮件</span>
				<ul class="nav nav-tabs right" >
					<li class="active" >
						<a href="#tab1" data-toggle="tab" >最新</a>
					</li>
					<li>
						<a href="#tab2" data-toggle="tab">未读</a>
					</li>
				</ul>
			</div>
			<div class="tab-content">
				<div class="tab-pane active table" id="tab1">
					<ul>
						<?php if(is_array($new_mail_list)): $i = 0; $__LIST__ = $new_mail_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
								<span class="right hidden-phone"><?php echo (todate($vo["create_time"],'m-d h:m')); ?></span>
								<span  class="auto autocut">
									<a href="<?php echo U('mail/read?id='.$vo['id']);?>" node="85" return_url="<?php echo U('mail/mail_list?folder=inbox');?>"><?php echo ($vo["title"]); ?></a>
								</span>
							</li><?php endforeach; endif; else: echo "" ;endif; ?>
					</ul>
				</div>
				<div class="tab-pane table" id="tab2">
					<ul>
						<?php if(is_array($unread_mail_list)): $i = 0; $__LIST__ = $unread_mail_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
								<span class="right hidden-phone"><?php echo (todate($vo["create_time"],'m-d h:m')); ?></span>
								<span  class="auto autocut">
									<a href="<?php echo U('process/read?id='.$vo['id']);?>" node="87" return_url="<?php echo U('process/process_list?folder=submit');?>"><?php echo ($vo["title"]); ?></a>
								</span>
							</li><?php endforeach; endif; else: echo "" ;endif; ?>
					</ul>
				</div>
			</div>
		</div>
		<!-- 邮件结束 -->

		<!-- 审批开始 -->
		<div class="tabbable span6 tab_box" sort="2">
			<div class="tab_head">
				<span>审批</span>
				<ul class="nav nav-tabs right" >
					<li class="active" >
						<a href="#tab3" data-toggle="tab" >待办</a>
					</li>
					<li >
						<a href="#tab4" data-toggle="tab">已提交</a>
					</li>
				</ul>
			</div>
			<div class="tab-content">
				<div class="tab-pane active table" id="tab3">
					<ul>
						<?php if(is_array($todo_process_list)): $i = 0; $__LIST__ = $todo_process_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
								<span class="right hidden-phone"><?php echo (todate($vo["create_time"],'m-d h:m')); ?></span>
								<span  class="auto autocut">
									<a href="<?php echo U('process/read?id='.$vo['id']);?>" node="87" return_url="<?php echo U('process/process_list?folder=confirm');?>"><?php echo ($vo["title"]); ?></a>
								</span>
							</li><?php endforeach; endif; else: echo "" ;endif; ?>
					</ul>
				</div>
				<div class="tab-pane table" id="tab4">
					<ul>
						<?php if(is_array($submit_process_list)): $i = 0; $__LIST__ = $submit_process_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
								<span class="right hidden-phone"><?php echo (todate($vo["create_time"],'m-d h:m')); ?></span>
								<span  class="auto autocut">
									<a href="<?php echo U('process/read?id='.$vo['id']);?>" node="87" return_url="<?php echo U('process/process_list?folder=submit');?>"><?php echo ($vo["title"]); ?></a>
								</span>
							</li><?php endforeach; endif; else: echo "" ;endif; ?>
					</ul>
				</div>
			</div>
		</div>
		<!-- 审批结束 -->

		<!-- 文档开始 -->
		<div class="tabbable span6 tab_box" sort="3">
			<div class="tab_head">
				<span>文档</span>
				<ul class="nav nav-tabs right" >
					<li class="active" >
						<a href="#tab5" data-toggle="tab" >公用</a>
					</li>
					<li >
						<a href="#tab6" data-toggle="tab">个人</a>
					</li>
				</ul>
			</div>
			<div class="tab-content">
				<div class="tab-pane active table" id="tab5">
					<ul>
						<?php if(is_array($common_list)): $i = 0; $__LIST__ = $common_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
								<span class="right hidden-phone"><?php echo (todate($vo["create_time"],'m-d h:m')); ?></span>
								<span  class="auto autocut">
									<a href="<?php echo U('doc/read?id='.$vo['id']);?>" node="88" return_url="<?php echo U('doc/index');?>"><?php echo ($vo["name"]); ?></a>
								</span>
							</li><?php endforeach; endif; else: echo "" ;endif; ?>
					</ul>
				</div>
				<div class="tab-pane table" id="tab6">
					<ul>
						<?php if(is_array($personal_list)): $i = 0; $__LIST__ = $personal_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
								<span class="right hidden-phone"><?php echo (todate($vo["create_time"],'m-d h:m')); ?></span>
								<span  class="auto autocut">
									<a href="<?php echo U('doc/read?id='.$vo['id']);?>" node="88" return_url="<?php echo U('doc/index');?>"><?php echo ($vo["name"]); ?></a>
								</span>
							</li><?php endforeach; endif; else: echo "" ;endif; ?>
					</ul>
				</div>
			</div>
		</div>
		<!-- 文档结束 -->

		<!-- 日程开始 -->
		<div class="tabbable span6 tab_box" sort="4">
			<div class="tab_head">
				<span>日程</span>
				<ul class="nav nav-tabs right" >
					<li class="active" >
						<a href="#tab7" data-toggle="tab" >日历</a>
					</li>
					<li >
						<a href="#tab8" data-toggle="tab">待办</a>
					</li>
				</ul>
			</div>
			<div class="tab-content">
				<div class="tab-pane active table" id="tab7">
					<ul>
						<?php if(is_array($schedule_list)): $i = 0; $__LIST__ = $schedule_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
								<span class="right hidden-phone"><?php echo ($vo["start_date"]); ?></span>
								<span  class="auto autocut">
									<a href="<?php echo U('schedule/read?id='.$vo['id']);?>" node="91" return_url="<?php echo U('schedule/index');?>"><?php echo ($vo["name"]); ?></a>
								</span>
							</li><?php endforeach; endif; else: echo "" ;endif; ?>
					</ul>
				</div>
				<div class="tab-pane table" id="tab8">
					<ul>
						<?php if(is_array($todo_list)): $i = 0; $__LIST__ = $todo_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
								<span class="right hidden-phone"><?php echo ($vo["start_date"]); ?></span>
								<span  class="auto autocut">
									<a href="<?php echo U('todo/edit?id='.$vo['id']);?>" node="91" return_url="<?php echo U('todo/index');?>"><?php echo ($vo["name"]); ?></a>
								</span>
							</li><?php endforeach; endif; else: echo "" ;endif; ?>
					</ul>
				</div>
			</div>
		</div>
		<!-- 日程结束 -->

		<!-- 公告开始 -->
		<div class="tabbable span6 tab_box" sort="5">
			<div class="tab_head">
				<span>公告</span>
			</div>
			<div class="tab-content">
				<div class="tab-pane active table" id="tab9">
					<ul>
						<?php if(is_array($new_notice_list)): $i = 0; $__LIST__ = $new_notice_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
								<span class="right hidden-phone"><?php echo (todate($vo["create_time"],'m-d')); ?></span>
								<span  class="auto autocut">
									<a href="<?php echo U('notice/read?id='.$vo['id']);?>" node="83" return_url="<?php echo U('notice/index');?>"><?php echo ($vo["title"]); ?></a>
								</span>
							</li><?php endforeach; endif; else: echo "" ;endif; ?>
					</ul>
				</div>
			</div>
		</div>
		<!-- 公告结束 -->

		<!-- 论坛开始 -->
		<div class="tabbable span6 tab_box"  sort="6">
			<div class="tab_head">
				<span>论坛</span>
			</div>
			<div class="tab-content">
				<div class="tab-pane active table" id="tab10">
					<ul>
						<?php if(is_array($new_forum_list)): $i = 0; $__LIST__ = $new_forum_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
								<span class="right hidden-phone"><?php echo (todate($vo["create_time"],'m-d')); ?></span>
								<span  class="auto autocut">
									<a href="<?php echo U('forum/read?id='.$vo['id']);?>"  node="83" return_url="<?php echo U('forum/index');?>"><?php echo ($vo["title"]); ?></a>
								</span>
							</li><?php endforeach; endif; else: echo "" ;endif; ?>
					</ul>
				</div>
			</div>
		</div>
		<!-- 论坛结束 -->
	</div>
</div>	
	<link type="text/css" href="__PUBLIC__/css/jquery-ui.css" rel="stylesheet"/>
	<script type="text/javascript" src="__PUBLIC__/js/jquery-ui.min.js"></script>
	<script>
	$(function(){
			$(".home .row-fluid").sortable({
			cancel:".tab-content,.tab_head span,.tab_head ul.nav",
			 stop: function(event,ui){
				set_sort()
			 }
		});
			$( ".home .row-fluid").disableSelection();
			$( ".tab_head").disableSelection();
		init_sort("<?php echo ($home_sort); ?>");
		$(".home li a").click(function(){
			click_home_list($(this));
		})
	});	

	function init_sort(sort_string){
		array_sort=sort_string.split(",");
		for (x in array_sort)
		{
			index=array_sort[x];
			last=$(".tab_box:last");
			current=$(".tab_box[sort='"+index+"']");			
			if(index!==last.attr("sort")){
				current.insertAfter(last);
			}
		}
	};
	function set_sort(){
		var sort_string="";
		$(".tab_box").each(function(){
			sort_string=sort_string+$(this).attr("sort")+",";
		})
		sendAjax("<?php echo U('set_sort');?>","val="+sort_string);	
	}
	</script>
	<script src="__PUBLIC__/js/bootstrap.min.js"></script>
	<script src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript" src="http://tajs.qq.com/stats?sId=20624928" charset="UTF-8"></script>
</body>
</html>